#include <iostream>
#include <string>
using namespace std;
string s;
int n,m;
int main()
{
	while(cin >> n)
	{
		int a,b;
		int i = 0;
		for(i = 0; i < n;i++)
		{
			cin >> a;
			to_string(a);
			s += a;
		}
		cin >> b;
		size_t t = s.find(b,0);
		cout << t << endl;
		
	}
	return 0;
}
